<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<head>
    <base href="<%=basePath%>"/>
    <title>Title</title>
</head>
<body>
<h2>Hello World!</h2>
<h1>用户登录</h1>
<hr/>
<form method="post" name="login_form" action="user/login.do">
    <div><label for="username">用户&emsp;名:</label><input type="text" name="username" id="username"/></div>
    <div><label for="password">用户密码:</label><input type="password" name="password" id="password"/></div>
    <div><input type="submit" value="登录"/>&emsp;&emsp;&emsp;<input type="button" onclick="location.href='/register.do'"
                                                                   value="注册"></div>
    <input type="button" onclick="location.href = 'gem.jpg'" value="邓紫棋"/>
</form>
<form method="post" action="user/check_valid.do">
    <h3>用户信息检测是否合法</h3>
    <input type="text" name="field" value="field"/>
    <input type="text" name="type" value="type"/>
    <input type="submit" value="更新">
    <img src="images/image.png" height="120"/>
</form>
<input type="button" value="上传文件" onclick="location.href = 'file.do'"/><br/>
<%--<%
    File files = new File("E:\\java\\mmall\\src\\main\\webapp\\2017-09-20");
    String[] file = files.list();
    PrintWriter pw = response.getWriter();
    if (file == null) pw.write("2233");
    request.setAttribute("file",file);
%>
<c:forEach items="${file}" var="f" >
    <c:out value="${f}"/>
    <div >
        <img src="/2017-09-20/${f}" style="width: 250px;border: solid 1px yellow;" />
    </div>
</c:forEach>--%>
<input type="button" onclick="location.href = 'manager.do'" value="后台管理员系统"/><br/>
<input type="button" onclick="location.href = 'product.do'" value="商品展示页面"/><br/><br/>
<form method="post" action="cart/list2.do">
    <input type="submit" value="购物车查看"/><br/>
</form>
<form method="post" action="shipping/list2.do">
    <input type="submit" value="收货地址"/><br/>
</form>
<br/>
<input type="button" onclick="location.href = 'pay.do'" value="订单支付页面"/>
</body>
</html>
